package com.igeek.bean;

import java.util.Objects;

public class Student {

    private int age;

    private String stuNo;

    public Student() {
    }

    public Student(int age, String stuNo) {
        this.age = age;
        this.stuNo = stuNo;
    }


    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getStuNo() {
        return stuNo;
    }

    public void setStuNo(String stuNo) {
        this.stuNo = stuNo;
    }

    @Override
    public String toString() {
        return "Student{" +
                "age=" + age +
                ", stuNo='" + stuNo + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Student student = (Student) o;
        return Objects.equals(stuNo, student.stuNo);
    }

    @Override
    public int hashCode() {
        return Objects.hash(stuNo);
    }
}
